﻿<Activity mc:Ignorable="sap sap2010 sads" x:Class="T2.WebSecurity.Business.Workflows.ApplicationQuery"
 xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities"
 xmlns:av="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
 xmlns:mca="clr-namespace:Microsoft.CSharp.Activities;assembly=System.Activities"
 xmlns:s="clr-namespace:System;assembly=mscorlib"
 xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger"
 xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation"
 xmlns:sap2010="http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation"
 xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib"
 xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=mscorlib"
 xmlns:twb="clr-namespace:T2.WebSecurity.Business;assembly=T2.WebSecurity.Business.Entities"
 xmlns:twbei="clr-namespace:T2.WebSecurity.Business.Entities.Interfaces;assembly=T2.WebSecurity.Business.Entities"
 xmlns:twbesi="clr-namespace:T2.WebSecurity.Business.Entities.Search.Interfaces;assembly=T2.WebSecurity.Business.Entities"
 xmlns:twbwa="clr-namespace:T2.WebSecurity.Business.Workflow.Activites;assembly=T2.WebSecurity.Business.Workflow.Activities"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <x:Members>
    <x:Property Name="BusinessService" Type="InArgument(twb:IBusinessService)" />
    <x:Property Name="UserName" Type="InArgument(x:String)" />
    <x:Property Name="Param" Type="InArgument(twbei:IApplication_biz)" />
    <x:Property Name="ParamSearch" Type="InArgument(twbesi:IApplicationSearch_biz)" />
    <x:Property Name="RetVal" Type="OutArgument(twbei:IApplication_biz)" />
    <x:Property Name="RetValCollection" Type="OutArgument(twbei:IApplication_biz[])" />
    <x:Property Name="RoleNames" Type="InArgument(s:String[])" />
    <x:Property Name="UserId" Type="InArgument(x:Int32)" />
  </x:Members>
  <sap2010:ExpressionActivityEditor.ExpressionActivityEditor>C#</sap2010:ExpressionActivityEditor.ExpressionActivityEditor>
  <sap2010:WorkflowViewState.IdRef>T2.WebSecurity.Business.Workflows.ApplicationController_1</sap2010:WorkflowViewState.IdRef>
  <TextExpression.NamespacesForImplementation>
    <sco:Collection x:TypeArguments="x:String">
      <x:String>System</x:String>
      <x:String>System.Collections.Generic</x:String>
      <x:String>System.Data</x:String>
      <x:String>System.Linq</x:String>
      <x:String>System.Text</x:String>
      <x:String>T2.WebSecurity.Business</x:String>
      <x:String>T2.WebSecurity.Business.Entities.Interfaces</x:String>
      <x:String>T2.WebSecurity.Business.Entities.Search.Interfaces</x:String>
    </sco:Collection>
  </TextExpression.NamespacesForImplementation>
  <TextExpression.ReferencesForImplementation>
    <sco:Collection x:TypeArguments="AssemblyReference">
      <AssemblyReference>EntityFramework</AssemblyReference>
      <AssemblyReference>Microsoft.Practices.EnterpriseLibrary.Common</AssemblyReference>
      <AssemblyReference>Microsoft.Practices.EnterpriseLibrary.Data</AssemblyReference>
      <AssemblyReference>Microsoft.Practices.EnterpriseLibrary.Logging</AssemblyReference>
      <AssemblyReference>Microsoft.Practices.EnterpriseLibrary.Logging.Database</AssemblyReference>
      <AssemblyReference>Microsoft.Practices.EnterpriseLibrary.Validation</AssemblyReference>
      <AssemblyReference>System</AssemblyReference>
      <AssemblyReference>System.Activities</AssemblyReference>
      <AssemblyReference>System.Configuration</AssemblyReference>
      <AssemblyReference>System.Core</AssemblyReference>
      <AssemblyReference>System.Drawing</AssemblyReference>
      <AssemblyReference>System.Management</AssemblyReference>
      <AssemblyReference>System.ServiceModel</AssemblyReference>
      <AssemblyReference>System.ServiceModel.Activities</AssemblyReference>
      <AssemblyReference>System.Web</AssemblyReference>
      <AssemblyReference>System.Web.ApplicationServices</AssemblyReference>
      <AssemblyReference>System.Web.Providers</AssemblyReference>
      <AssemblyReference>System.Web.Services</AssemblyReference>
      <AssemblyReference>System.Workflow.Activities</AssemblyReference>
      <AssemblyReference>System.Workflow.ComponentModel</AssemblyReference>
      <AssemblyReference>System.Workflow.Runtime</AssemblyReference>
      <AssemblyReference>System.WorkflowServices</AssemblyReference>
      <AssemblyReference>System.Xaml</AssemblyReference>
      <AssemblyReference>System.Xml.Linq</AssemblyReference>
      <AssemblyReference>System.Data.DataSetExtensions</AssemblyReference>
      <AssemblyReference>Microsoft.CSharp</AssemblyReference>
      <AssemblyReference>System.Data</AssemblyReference>
      <AssemblyReference>System.Xml</AssemblyReference>
      <AssemblyReference>WebMatrix.WebData</AssemblyReference>
      <AssemblyReference>T2.WebSecurity.Business.Entities</AssemblyReference>
      <AssemblyReference>T2.WebSecurity.Business.Workflow.Activities</AssemblyReference>
      <AssemblyReference>T2.WebSecurity.Common</AssemblyReference>
      <AssemblyReference>T2.WebSecurity.Data</AssemblyReference>
      <AssemblyReference>mscorlib</AssemblyReference>
      <AssemblyReference>T2.WebSecurity.Business</AssemblyReference>
    </sco:Collection>
  </TextExpression.ReferencesForImplementation>
  <Flowchart sap2010:WorkflowViewState.IdRef="Flowchart_1">
    <Flowchart.Variables>
      <Variable x:TypeArguments="twbei:IApplicationUser_biz[]" Name="userApplications" />
    </Flowchart.Variables>
    <Flowchart.StartNode>
      <FlowSwitch x:TypeArguments="x:String" x:Name="__ReferenceID0" sap2010:WorkflowViewState.IdRef="FlowSwitch`1_1">
        <FlowSwitch.Expression>
          <mca:CSharpValue x:TypeArguments="x:String">Param.Action</mca:CSharpValue>
        </FlowSwitch.Expression>
        <FlowStep x:Key="GetAll" x:Name="__ReferenceID1" sap2010:WorkflowViewState.IdRef="FlowStep_11">
          <Sequence DisplayName="Get All Sequence" sap2010:WorkflowViewState.IdRef="Sequence_2">
            <twbwa:Db_T2_WebSecurity_Application_GetAll DisplayName="Application_GetAll" sap2010:WorkflowViewState.IdRef="Db_T2_WebSecurity_Application_GetAll_2">
              <twbwa:Db_T2_WebSecurity_Application_GetAll.BS>
                <InArgument x:TypeArguments="twb:IBusinessService">
                  <mca:CSharpValue x:TypeArguments="twb:IBusinessService">BusinessService</mca:CSharpValue>
                </InArgument>
              </twbwa:Db_T2_WebSecurity_Application_GetAll.BS>
              <twbwa:Db_T2_WebSecurity_Application_GetAll.RetVal>
                <OutArgument x:TypeArguments="twbei:IApplication_biz[]">
                  <mca:CSharpReference x:TypeArguments="twbei:IApplication_biz[]">RetValCollection</mca:CSharpReference>
                </OutArgument>
              </twbwa:Db_T2_WebSecurity_Application_GetAll.RetVal>
            </twbwa:Db_T2_WebSecurity_Application_GetAll>
            <If DisplayName="If super admin" sap2010:WorkflowViewState.IdRef="If_2">
              <If.Condition>
                <InArgument x:TypeArguments="x:Boolean">
                  <mca:CSharpValue x:TypeArguments="x:Boolean">RoleNames.Contains("super admin")</mca:CSharpValue>
                </InArgument>
              </If.Condition>
              <If.Else>
                <Sequence sap2010:WorkflowViewState.IdRef="Sequence_1">
                  <twbwa:Db_T2_WebSecurity_ApplicationUser_GetAll DisplayName="ApplicationUser_GetAll" sap2010:WorkflowViewState.IdRef="Db_T2_WebSecurity_ApplicationUser_GetAll_1">
                    <twbwa:Db_T2_WebSecurity_ApplicationUser_GetAll.BS>
                      <InArgument x:TypeArguments="twb:IBusinessService">
                        <mca:CSharpValue x:TypeArguments="twb:IBusinessService">BusinessService</mca:CSharpValue>
                      </InArgument>
                    </twbwa:Db_T2_WebSecurity_ApplicationUser_GetAll.BS>
                    <twbwa:Db_T2_WebSecurity_ApplicationUser_GetAll.RetVal>
                      <OutArgument x:TypeArguments="twbei:IApplicationUser_biz[]">
                        <mca:CSharpReference x:TypeArguments="twbei:IApplicationUser_biz[]">userApplications</mca:CSharpReference>
                      </OutArgument>
                    </twbwa:Db_T2_WebSecurity_ApplicationUser_GetAll.RetVal>
                  </twbwa:Db_T2_WebSecurity_ApplicationUser_GetAll>
                  <Assign DisplayName="Assign Apps of User" sap2010:WorkflowViewState.IdRef="Assign_1">
                    <Assign.To>
                      <OutArgument x:TypeArguments="twbei:IApplicationUser_biz[]">
                        <mca:CSharpReference x:TypeArguments="twbei:IApplicationUser_biz[]">userApplications</mca:CSharpReference>
                      </OutArgument>
                    </Assign.To>
                    <Assign.Value>
                      <InArgument x:TypeArguments="twbei:IApplicationUser_biz[]">
                        <mca:CSharpValue x:TypeArguments="twbei:IApplicationUser_biz[]" xml:space="preserve">userApplications
                .Where(f=&gt;f.UserId==UserId)
                .ToArray()</mca:CSharpValue>
                      </InArgument>
                    </Assign.Value>
                  </Assign>
                  <If DisplayName="If User in Application" sap2010:WorkflowViewState.IdRef="If_1">
                    <If.Condition>
                      <InArgument x:TypeArguments="x:Boolean">
                        <mca:CSharpValue x:TypeArguments="x:Boolean">userApplications.Count()&lt;=0</mca:CSharpValue>
                      </InArgument>
                    </If.Condition>
                    <If.Then>
                      <TerminateWorkflow sap2010:WorkflowViewState.IdRef="TerminateWorkflow_2" Reason="Permission Denied">
                        <TerminateWorkflow.Exception>
                          <InArgument x:TypeArguments="s:Exception">
                            <mca:CSharpValue x:TypeArguments="s:Exception">new Exception("Not authorized")</mca:CSharpValue>
                          </InArgument>
                        </TerminateWorkflow.Exception>
                      </TerminateWorkflow>
                    </If.Then>
                  </If>
                </Sequence>
              </If.Else>
            </If>
            <If DisplayName="If app admin" sap2010:WorkflowViewState.IdRef="If_3">
              <If.Condition>
                <InArgument x:TypeArguments="x:Boolean">
                  <mca:CSharpValue x:TypeArguments="x:Boolean">RoleNames.Contains("application admin")</mca:CSharpValue>
                </InArgument>
              </If.Condition>
              <If.Then>
                <Assign sap2010:WorkflowViewState.IdRef="Assign_4">
                  <Assign.To>
                    <OutArgument x:TypeArguments="twbei:IApplication_biz[]">
                      <mca:CSharpReference x:TypeArguments="twbei:IApplication_biz[]">RetValCollection</mca:CSharpReference>
                    </OutArgument>
                  </Assign.To>
                  <Assign.Value>
                    <InArgument x:TypeArguments="twbei:IApplication_biz[]">
                      <mca:CSharpValue x:TypeArguments="twbei:IApplication_biz[]" xml:space="preserve">RetValCollection
                .Where(f=&gt; f.ApplicationUser_List.Exists(u=&gt;u.UserId== UserId))
                .ToArray()</mca:CSharpValue>
                    </InArgument>
                  </Assign.Value>
                </Assign>
              </If.Then>
            </If>
            <If DisplayName="If admin" sap2010:WorkflowViewState.IdRef="If_4">
              <If.Condition>
                <InArgument x:TypeArguments="x:Boolean">
                  <mca:CSharpValue x:TypeArguments="x:Boolean">RoleNames.Contains("admin")</mca:CSharpValue>
                </InArgument>
              </If.Condition>
              <If.Then>
                <Assign sap2010:WorkflowViewState.IdRef="Assign_5">
                  <Assign.To>
                    <OutArgument x:TypeArguments="twbei:IApplication_biz[]">
                      <mca:CSharpReference x:TypeArguments="twbei:IApplication_biz[]">RetValCollection</mca:CSharpReference>
                    </OutArgument>
                  </Assign.To>
                  <Assign.Value>
                    <InArgument x:TypeArguments="twbei:IApplication_biz[]">
                      <mca:CSharpValue x:TypeArguments="twbei:IApplication_biz[]" xml:space="preserve">RetValCollection
                .Where(f=&gt; f.ApplicationUser_List.Exists(u=&gt;u.UserId== UserId))
                .ToArray()</mca:CSharpValue>
                    </InArgument>
                  </Assign.Value>
                </Assign>
              </If.Then>
            </If>
            <If DisplayName="If user" sap2010:WorkflowViewState.IdRef="If_5">
              <If.Condition>
                <InArgument x:TypeArguments="x:Boolean">
                  <mca:CSharpValue x:TypeArguments="x:Boolean">RoleNames.Contains("user")</mca:CSharpValue>
                </InArgument>
              </If.Condition>
              <If.Then>
                <Assign sap2010:WorkflowViewState.IdRef="Assign_3">
                  <Assign.To>
                    <OutArgument x:TypeArguments="twbei:IApplication_biz[]">
                      <mca:CSharpReference x:TypeArguments="twbei:IApplication_biz[]">RetValCollection</mca:CSharpReference>
                    </OutArgument>
                  </Assign.To>
                  <Assign.Value>
                    <InArgument x:TypeArguments="twbei:IApplication_biz[]">
                      <mca:CSharpValue x:TypeArguments="twbei:IApplication_biz[]" xml:space="preserve">RetValCollection
                .Where(f=&gt; f.ApplicationUser_List.Exists(u=&gt;u.UserId== UserId))
                .ToArray()</mca:CSharpValue>
                    </InArgument>
                  </Assign.Value>
                </Assign>
              </If.Then>
            </If>
          </Sequence>
        </FlowStep>
        <FlowStep x:Key="GetOne" x:Name="__ReferenceID2" sap2010:WorkflowViewState.IdRef="FlowStep_12">
          <Sequence DisplayName="Get One Sequence" sap2010:WorkflowViewState.IdRef="Sequence_4">
            <twbwa:Db_T2_WebSecurity_Application_GetOne DisplayName="Application_GetOne" sap2010:WorkflowViewState.IdRef="Db_T2_WebSecurity_Application_GetOne_2">
              <twbwa:Db_T2_WebSecurity_Application_GetOne.ApplicationID>
                <InArgument x:TypeArguments="x:Int32">
                  <mca:CSharpValue x:TypeArguments="x:Int32">Param.ApplicationID</mca:CSharpValue>
                </InArgument>
              </twbwa:Db_T2_WebSecurity_Application_GetOne.ApplicationID>
              <twbwa:Db_T2_WebSecurity_Application_GetOne.BS>
                <InArgument x:TypeArguments="twb:IBusinessService">
                  <mca:CSharpValue x:TypeArguments="twb:IBusinessService">BusinessService</mca:CSharpValue>
                </InArgument>
              </twbwa:Db_T2_WebSecurity_Application_GetOne.BS>
              <twbwa:Db_T2_WebSecurity_Application_GetOne.RetVal>
                <OutArgument x:TypeArguments="twbei:IApplication_biz">
                  <mca:CSharpReference x:TypeArguments="twbei:IApplication_biz">RetVal</mca:CSharpReference>
                </OutArgument>
              </twbwa:Db_T2_WebSecurity_Application_GetOne.RetVal>
            </twbwa:Db_T2_WebSecurity_Application_GetOne>
            <If DisplayName="If super admin" sap2010:WorkflowViewState.IdRef="If_7">
              <If.Condition>
                <InArgument x:TypeArguments="x:Boolean">
                  <mca:CSharpValue x:TypeArguments="x:Boolean">RoleNames.Contains("super admin")</mca:CSharpValue>
                </InArgument>
              </If.Condition>
              <If.Else>
                <Sequence sap2010:WorkflowViewState.IdRef="Sequence_3">
                  <twbwa:Db_T2_WebSecurity_ApplicationUser_GetAll DisplayName="ApplicationUser_GetAll" sap2010:WorkflowViewState.IdRef="Db_T2_WebSecurity_ApplicationUser_GetAll_2">
                    <twbwa:Db_T2_WebSecurity_ApplicationUser_GetAll.BS>
                      <InArgument x:TypeArguments="twb:IBusinessService">
                        <mca:CSharpValue x:TypeArguments="twb:IBusinessService">BusinessService</mca:CSharpValue>
                      </InArgument>
                    </twbwa:Db_T2_WebSecurity_ApplicationUser_GetAll.BS>
                    <twbwa:Db_T2_WebSecurity_ApplicationUser_GetAll.RetVal>
                      <OutArgument x:TypeArguments="twbei:IApplicationUser_biz[]">
                        <mca:CSharpReference x:TypeArguments="twbei:IApplicationUser_biz[]">userApplications</mca:CSharpReference>
                      </OutArgument>
                    </twbwa:Db_T2_WebSecurity_ApplicationUser_GetAll.RetVal>
                  </twbwa:Db_T2_WebSecurity_ApplicationUser_GetAll>
                  <Assign DisplayName="Assign Apps of User" sap2010:WorkflowViewState.IdRef="Assign_6">
                    <Assign.To>
                      <OutArgument x:TypeArguments="twbei:IApplicationUser_biz[]">
                        <mca:CSharpReference x:TypeArguments="twbei:IApplicationUser_biz[]">userApplications</mca:CSharpReference>
                      </OutArgument>
                    </Assign.To>
                    <Assign.Value>
                      <InArgument x:TypeArguments="twbei:IApplicationUser_biz[]">
                        <mca:CSharpValue x:TypeArguments="twbei:IApplicationUser_biz[]" xml:space="preserve">userApplications
                .Where(f =&gt; f.UserId == UserId)
                .ToArray()</mca:CSharpValue>
                      </InArgument>
                    </Assign.Value>
                  </Assign>
                  <If DisplayName="If User in Application" sap2010:WorkflowViewState.IdRef="If_6">
                    <If.Condition>
                      <InArgument x:TypeArguments="x:Boolean">
                        <mca:CSharpValue x:TypeArguments="x:Boolean">userApplications.Count()&lt;=0</mca:CSharpValue>
                      </InArgument>
                    </If.Condition>
                    <If.Then>
                      <TerminateWorkflow sap2010:WorkflowViewState.IdRef="TerminateWorkflow_3" Reason="Permission Denied">
                        <TerminateWorkflow.Exception>
                          <InArgument x:TypeArguments="s:Exception">
                            <mca:CSharpValue x:TypeArguments="s:Exception">new Exception("Not authorized")</mca:CSharpValue>
                          </InArgument>
                        </TerminateWorkflow.Exception>
                      </TerminateWorkflow>
                    </If.Then>
                  </If>
                </Sequence>
              </If.Else>
            </If>
            <If DisplayName="If app admin" sap2010:WorkflowViewState.IdRef="If_8">
              <If.Condition>
                <InArgument x:TypeArguments="x:Boolean">
                  <mca:CSharpValue x:TypeArguments="x:Boolean">RoleNames.Contains("application admin")</mca:CSharpValue>
                </InArgument>
              </If.Condition>
              <If.Then>
                <Assign sap2010:WorkflowViewState.IdRef="Assign_15">
                  <Assign.To>
                    <OutArgument x:TypeArguments="twbei:IApplication_biz">
                      <mca:CSharpReference x:TypeArguments="twbei:IApplication_biz">RetVal</mca:CSharpReference>
                    </OutArgument>
                  </Assign.To>
                  <Assign.Value>
                    <InArgument x:TypeArguments="twbei:IApplication_biz">
                      <mca:CSharpValue x:TypeArguments="twbei:IApplication_biz">RetVal.ApplicationUser_List.Any(f=&gt;f.UserId==UserId)?RetVal:null</mca:CSharpValue>
                    </InArgument>
                  </Assign.Value>
                </Assign>
              </If.Then>
            </If>
            <If DisplayName="If admin" sap2010:WorkflowViewState.IdRef="If_9">
              <If.Condition>
                <InArgument x:TypeArguments="x:Boolean">
                  <mca:CSharpValue x:TypeArguments="x:Boolean">RoleNames.Contains("admin")</mca:CSharpValue>
                </InArgument>
              </If.Condition>
              <If.Then>
                <Assign sap2010:WorkflowViewState.IdRef="Assign_16">
                  <Assign.To>
                    <OutArgument x:TypeArguments="twbei:IApplication_biz">
                      <mca:CSharpReference x:TypeArguments="twbei:IApplication_biz">RetVal</mca:CSharpReference>
                    </OutArgument>
                  </Assign.To>
                  <Assign.Value>
                    <InArgument x:TypeArguments="twbei:IApplication_biz">
                      <mca:CSharpValue x:TypeArguments="twbei:IApplication_biz">RetVal.ApplicationUser_List.Any(f=&gt;f.UserId==UserId)?RetVal:null</mca:CSharpValue>
                    </InArgument>
                  </Assign.Value>
                </Assign>
              </If.Then>
            </If>
            <If DisplayName="If user" sap2010:WorkflowViewState.IdRef="If_10">
              <If.Condition>
                <InArgument x:TypeArguments="x:Boolean">
                  <mca:CSharpValue x:TypeArguments="x:Boolean">RoleNames.Contains("user")</mca:CSharpValue>
                </InArgument>
              </If.Condition>
              <If.Then>
                <Assign sap2010:WorkflowViewState.IdRef="Assign_8">
                  <Assign.To>
                    <OutArgument x:TypeArguments="twbei:IApplication_biz">
                      <mca:CSharpReference x:TypeArguments="twbei:IApplication_biz">RetVal</mca:CSharpReference>
                    </OutArgument>
                  </Assign.To>
                  <Assign.Value>
                    <InArgument x:TypeArguments="twbei:IApplication_biz">
                      <mca:CSharpValue x:TypeArguments="twbei:IApplication_biz">RetVal.ApplicationUser_List.Any(f=&gt;f.UserId==UserId)?RetVal:null</mca:CSharpValue>
                    </InArgument>
                  </Assign.Value>
                </Assign>
              </If.Then>
            </If>
          </Sequence>
        </FlowStep>
        <FlowStep x:Key="Search" x:Name="__ReferenceID3" sap2010:WorkflowViewState.IdRef="FlowStep_13">
          <Sequence DisplayName="Search Sequence" sap2010:WorkflowViewState.IdRef="Sequence_6">
            <twbwa:Db_T2_WebSecurity_Application_Search DisplayName="Application_Search" sap2010:WorkflowViewState.IdRef="Db_T2_WebSecurity_Application_Search_2">
              <twbwa:Db_T2_WebSecurity_Application_Search.BS>
                <InArgument x:TypeArguments="twb:IBusinessService">
                  <mca:CSharpValue x:TypeArguments="twb:IBusinessService">BusinessService</mca:CSharpValue>
                </InArgument>
              </twbwa:Db_T2_WebSecurity_Application_Search.BS>
              <twbwa:Db_T2_WebSecurity_Application_Search.RetVal>
                <OutArgument x:TypeArguments="twbei:IApplication_biz[]">
                  <mca:CSharpReference x:TypeArguments="twbei:IApplication_biz[]">RetValCollection</mca:CSharpReference>
                </OutArgument>
              </twbwa:Db_T2_WebSecurity_Application_Search.RetVal>
              <twbwa:Db_T2_WebSecurity_Application_Search.SearchParam>
                <InArgument x:TypeArguments="twbesi:IApplicationSearch_biz">
                  <mca:CSharpValue x:TypeArguments="twbesi:IApplicationSearch_biz">ParamSearch</mca:CSharpValue>
                </InArgument>
              </twbwa:Db_T2_WebSecurity_Application_Search.SearchParam>
            </twbwa:Db_T2_WebSecurity_Application_Search>
            <If DisplayName="If super admin" sap2010:WorkflowViewState.IdRef="If_12">
              <If.Condition>
                <InArgument x:TypeArguments="x:Boolean">
                  <mca:CSharpValue x:TypeArguments="x:Boolean">RoleNames.Contains("super admin")</mca:CSharpValue>
                </InArgument>
              </If.Condition>
              <If.Else>
                <Sequence sap2010:WorkflowViewState.IdRef="Sequence_5">
                  <twbwa:Db_T2_WebSecurity_ApplicationUser_GetAll DisplayName="ApplicationUser_GetAll" sap2010:WorkflowViewState.IdRef="Db_T2_WebSecurity_ApplicationUser_GetAll_3">
                    <twbwa:Db_T2_WebSecurity_ApplicationUser_GetAll.BS>
                      <InArgument x:TypeArguments="twb:IBusinessService">
                        <mca:CSharpValue x:TypeArguments="twb:IBusinessService">BusinessService</mca:CSharpValue>
                      </InArgument>
                    </twbwa:Db_T2_WebSecurity_ApplicationUser_GetAll.BS>
                    <twbwa:Db_T2_WebSecurity_ApplicationUser_GetAll.RetVal>
                      <OutArgument x:TypeArguments="twbei:IApplicationUser_biz[]">
                        <mca:CSharpReference x:TypeArguments="twbei:IApplicationUser_biz[]">userApplications</mca:CSharpReference>
                      </OutArgument>
                    </twbwa:Db_T2_WebSecurity_ApplicationUser_GetAll.RetVal>
                  </twbwa:Db_T2_WebSecurity_ApplicationUser_GetAll>
                  <Assign DisplayName="Assign Apps of User" sap2010:WorkflowViewState.IdRef="Assign_11">
                    <Assign.To>
                      <OutArgument x:TypeArguments="twbei:IApplicationUser_biz[]">
                        <mca:CSharpReference x:TypeArguments="twbei:IApplicationUser_biz[]">userApplications</mca:CSharpReference>
                      </OutArgument>
                    </Assign.To>
                    <Assign.Value>
                      <InArgument x:TypeArguments="twbei:IApplicationUser_biz[]">
                        <mca:CSharpValue x:TypeArguments="twbei:IApplicationUser_biz[]" xml:space="preserve">userApplications
                .Where(f=&gt;f.UserId==UserId)
                .ToArray()</mca:CSharpValue>
                      </InArgument>
                    </Assign.Value>
                  </Assign>
                  <If DisplayName="If User in Application" sap2010:WorkflowViewState.IdRef="If_11">
                    <If.Condition>
                      <InArgument x:TypeArguments="x:Boolean">
                        <mca:CSharpValue x:TypeArguments="x:Boolean">userApplications.Count()&lt;=0</mca:CSharpValue>
                      </InArgument>
                    </If.Condition>
                    <If.Then>
                      <TerminateWorkflow sap2010:WorkflowViewState.IdRef="TerminateWorkflow_4" Reason="Permission Denied">
                        <TerminateWorkflow.Exception>
                          <InArgument x:TypeArguments="s:Exception">
                            <mca:CSharpValue x:TypeArguments="s:Exception">new Exception("Not authorized")</mca:CSharpValue>
                          </InArgument>
                        </TerminateWorkflow.Exception>
                      </TerminateWorkflow>
                    </If.Then>
                  </If>
                </Sequence>
              </If.Else>
            </If>
            <If DisplayName="If app admin" sap2010:WorkflowViewState.IdRef="If_13">
              <If.Condition>
                <InArgument x:TypeArguments="x:Boolean">
                  <mca:CSharpValue x:TypeArguments="x:Boolean">RoleNames.Contains("application admin")</mca:CSharpValue>
                </InArgument>
              </If.Condition>
              <If.Then>
                <Assign sap2010:WorkflowViewState.IdRef="Assign_12">
                  <Assign.To>
                    <OutArgument x:TypeArguments="twbei:IApplication_biz[]">
                      <mca:CSharpReference x:TypeArguments="twbei:IApplication_biz[]">RetValCollection</mca:CSharpReference>
                    </OutArgument>
                  </Assign.To>
                  <Assign.Value>
                    <InArgument x:TypeArguments="twbei:IApplication_biz[]">
                      <mca:CSharpValue x:TypeArguments="twbei:IApplication_biz[]" xml:space="preserve">RetValCollection
                .Where(f=&gt; f.ApplicationUser_List.Exists(u=&gt;u.UserId== UserId))
                .ToArray()</mca:CSharpValue>
                    </InArgument>
                  </Assign.Value>
                </Assign>
              </If.Then>
            </If>
            <If DisplayName="If admin" sap2010:WorkflowViewState.IdRef="If_14">
              <If.Condition>
                <InArgument x:TypeArguments="x:Boolean">
                  <mca:CSharpValue x:TypeArguments="x:Boolean">RoleNames.Contains("admin")</mca:CSharpValue>
                </InArgument>
              </If.Condition>
              <If.Then>
                <Assign sap2010:WorkflowViewState.IdRef="Assign_13">
                  <Assign.To>
                    <OutArgument x:TypeArguments="twbei:IApplication_biz[]">
                      <mca:CSharpReference x:TypeArguments="twbei:IApplication_biz[]">RetValCollection</mca:CSharpReference>
                    </OutArgument>
                  </Assign.To>
                  <Assign.Value>
                    <InArgument x:TypeArguments="twbei:IApplication_biz[]">
                      <mca:CSharpValue x:TypeArguments="twbei:IApplication_biz[]" xml:space="preserve">RetValCollection
                .Where(f=&gt; f.ApplicationUser_List.Exists(u=&gt;u.UserId== UserId))
                .ToArray()</mca:CSharpValue>
                    </InArgument>
                  </Assign.Value>
                </Assign>
              </If.Then>
            </If>
            <If DisplayName="If user" sap2010:WorkflowViewState.IdRef="If_15">
              <If.Condition>
                <InArgument x:TypeArguments="x:Boolean">
                  <mca:CSharpValue x:TypeArguments="x:Boolean">RoleNames.Contains("user")</mca:CSharpValue>
                </InArgument>
              </If.Condition>
              <If.Then>
                <Assign sap2010:WorkflowViewState.IdRef="Assign_14">
                  <Assign.To>
                    <OutArgument x:TypeArguments="twbei:IApplication_biz[]">
                      <mca:CSharpReference x:TypeArguments="twbei:IApplication_biz[]">RetValCollection</mca:CSharpReference>
                    </OutArgument>
                  </Assign.To>
                  <Assign.Value>
                    <InArgument x:TypeArguments="twbei:IApplication_biz[]">
                      <mca:CSharpValue x:TypeArguments="twbei:IApplication_biz[]" xml:space="preserve">RetValCollection
                .Where(f=&gt; f.ApplicationUser_List.Exists(u=&gt;u.UserId== UserId))
                .ToArray()</mca:CSharpValue>
                    </InArgument>
                  </Assign.Value>
                </Assign>
              </If.Then>
            </If>
          </Sequence>
        </FlowStep>
      </FlowSwitch>
    </Flowchart.StartNode>
    <x:Reference>__ReferenceID0</x:Reference>
    <x:Reference>__ReferenceID1</x:Reference>
    <x:Reference>__ReferenceID2</x:Reference>
    <x:Reference>__ReferenceID3</x:Reference>
    <sads:DebugSymbol.Symbol>d2BDOlxQcm9qZWN0c1xUMlxUMlNlY3VyaXR5XFQyLldlYlNlY3VyaXR5XFQyLldlYlNlY3VyaXR5LkJ1c2luZXNzXFdvcmtmbG93c1xBcHBsaWNhdGlvblF1ZXJ5LnhhbWxnUAOCBA8CAQFXC1dVAwHfBO0CC/kDFgMBkgPkAQvqAhYDAcUBWgvhARYCAQLuAg3+AjoDAcAE/wINswMSAwHzA7QDDcoDEgMB0wPLAw3hAxIDAbMD4gMN+AMSAwGTA+UBDfUBOgMB8wL2AQ2qAhIDAaYCqwINvwISAwGGAsACDdQCEgMB5gHVAg3pAhIDAcYBWw1mOgMBsAFnDZsBEgIBY5wBDbIBEgIBQ7MBDckBEgIBI8oBDeABEgIBA/YCE/YCeQMB1QT7AhP7AnEDAcsE8QIT8QJsAwHBBIIDE4IDcwMB9AOGAxGxAxwDAf4DtwMTtwN5AwHUA7sDEcgDGgMB3gPOAxPOA20DAbQD0gMR3wMaAwG+A+UDE+UDbAMBlAPpAxH2AxoDAZ4D8gET8gFtAwGIA+0BE+0BbAMB/gLoARPoAWMDAfQC+QET+QFzAwGnAv0BEagCHAMBsQKuAhOuAnkDAYcCsgIRvQIaAwGRAsMCE8MCbQMB5wHHAhHSAhoDAfEB2AIT2AJsAwHHAdwCEecCGgMB0QFjE2N5AwG7AV4TXmwDAbEBahNqcwIBZG4RmQEcAgFunwETnwF5AgFEowERsAEaAgFOtgETtgFtAgEkugERxwEaAgEuzQETzQFsAgEE0QER3gEaAgEOhwMTkgNEAwGrBJMDE6ADHAMBlgShAxOwAxgDAf8DwwMXxQMtAwHpA74DF74DfQMB3wPaAxfcAy0DAckD1QMX1QN9AwG/A/EDF/MDLQMBqQPsAxfsA30DAZ8D/gETiQJEAwHeAooCE5cCHAMByQKYAhOnAhgDAbICugIXugKmAQMBnAK1Ahe1AnEDAZICzwIXzwKmAQMB/AHKAhfKAnEDAfIB5AIX5AKmAQMB3AHfAhffAnEDAdIBbxN6RAMBmwF7E4gBHAMBhgGJAROYARgCAW+rARetAS0CAVmmARemAX0CAU/CARfEAS0CATm9ARe9AX0CAS/ZARfbAS0CARnUARfUAX0CAQ+PAxmPA4MBAwG2BIoDGYoDcgMBrASbAxmdAy0DAaEElgMZlgODAQMBlwSkAxmkA3YDAYAEqAMXrgMrAwGKBIYCGYYCgwEDAekCgQIZgQJyAwHfApICGZQCLQMB1AKNAhmNAoMBAwHKApsCGZsCdgMBswKfAhelAisDAb0Cdxl3gwEDAaYBchlycgMBnAGDARmFAS0DAZEBfhl+gwEDAYcBjAEZjAF2AgFwkAEXlgErAgF6qANnqAN6AwGVBKsDHasDfQMBiwSfAmefAnoDAcgCogIdogJ9AwG+ApABZ5ABegMBhQGTAR2TAX0CAXs=</sads:DebugSymbol.Symbol>
  </Flowchart>
  <sap2010:WorkflowViewState.ViewStateManager>
    <sap2010:ViewStateManager>
      <sap2010:ViewStateData Id="Db_T2_WebSecurity_Application_GetAll_2" sap:VirtualizedContainerService.HintSize="611,22">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Db_T2_WebSecurity_ApplicationUser_GetAll_1" sap:VirtualizedContainerService.HintSize="464,22">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Assign_1" sap:VirtualizedContainerService.HintSize="464,62">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="TerminateWorkflow_2" sap:VirtualizedContainerService.HintSize="200,22">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="If_1" sap:VirtualizedContainerService.HintSize="464,210" />
      <sap2010:ViewStateData Id="Sequence_1" sap:VirtualizedContainerService.HintSize="486,498">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="If_2" sap:VirtualizedContainerService.HintSize="611,648">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Assign_4" sap:VirtualizedContainerService.HintSize="242,62">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="If_3" sap:VirtualizedContainerService.HintSize="611,212">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Assign_5" sap:VirtualizedContainerService.HintSize="242,62">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="If_4" sap:VirtualizedContainerService.HintSize="611,212" />
      <sap2010:ViewStateData Id="Assign_3" sap:VirtualizedContainerService.HintSize="242,62">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="If_5" sap:VirtualizedContainerService.HintSize="611,212" />
      <sap2010:ViewStateData Id="Sequence_2" sap:VirtualizedContainerService.HintSize="200,51">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="FlowStep_11">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <av:Point x:Key="ShapeLocation">260,404.5</av:Point>
            <av:Size x:Key="ShapeSize">200,51</av:Size>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Db_T2_WebSecurity_Application_GetOne_2" sap:VirtualizedContainerService.HintSize="611,22">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Db_T2_WebSecurity_ApplicationUser_GetAll_2" sap:VirtualizedContainerService.HintSize="464,22">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Assign_6" sap:VirtualizedContainerService.HintSize="464,62">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="TerminateWorkflow_3" sap:VirtualizedContainerService.HintSize="200,22">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="If_6" sap:VirtualizedContainerService.HintSize="464,210" />
      <sap2010:ViewStateData Id="Sequence_3" sap:VirtualizedContainerService.HintSize="486,498">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="If_7" sap:VirtualizedContainerService.HintSize="611,648">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Assign_15" sap:VirtualizedContainerService.HintSize="242,62">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="If_8" sap:VirtualizedContainerService.HintSize="611,212">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Assign_16" sap:VirtualizedContainerService.HintSize="242,62">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="If_9" sap:VirtualizedContainerService.HintSize="611,212" />
      <sap2010:ViewStateData Id="Assign_8" sap:VirtualizedContainerService.HintSize="242,62">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="If_10" sap:VirtualizedContainerService.HintSize="611,212">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Sequence_4" sap:VirtualizedContainerService.HintSize="200,51">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="FlowStep_12">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <av:Point x:Key="ShapeLocation">30,404.5</av:Point>
            <av:Size x:Key="ShapeSize">200,51</av:Size>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Db_T2_WebSecurity_Application_Search_2" sap:VirtualizedContainerService.HintSize="611,22">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Db_T2_WebSecurity_ApplicationUser_GetAll_3" sap:VirtualizedContainerService.HintSize="464,22">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Assign_11" sap:VirtualizedContainerService.HintSize="464,62">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="TerminateWorkflow_4" sap:VirtualizedContainerService.HintSize="200,22">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="If_11" sap:VirtualizedContainerService.HintSize="464,210" />
      <sap2010:ViewStateData Id="Sequence_5" sap:VirtualizedContainerService.HintSize="486,498">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="If_12" sap:VirtualizedContainerService.HintSize="611,648">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Assign_12" sap:VirtualizedContainerService.HintSize="242,62">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="If_13" sap:VirtualizedContainerService.HintSize="611,212">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Assign_13" sap:VirtualizedContainerService.HintSize="242,62">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="If_14" sap:VirtualizedContainerService.HintSize="611,212" />
      <sap2010:ViewStateData Id="Assign_14" sap:VirtualizedContainerService.HintSize="242,62">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="If_15" sap:VirtualizedContainerService.HintSize="611,212" />
      <sap2010:ViewStateData Id="Sequence_6" sap:VirtualizedContainerService.HintSize="200,51">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="FlowStep_13">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <av:Point x:Key="ShapeLocation">490,404.5</av:Point>
            <av:Size x:Key="ShapeSize">200,51</av:Size>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="FlowSwitch`1_1" sap:VirtualizedContainerService.HintSize="70,87">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <av:Point x:Key="ShapeLocation">325,186.5</av:Point>
            <av:Size x:Key="ShapeSize">70,87</av:Size>
            <av:PointCollection x:Key="GetAllConnector">360,273.5 360,404.5</av:PointCollection>
            <av:PointCollection x:Key="GetOneConnector">325,230 130,230 130,404.5</av:PointCollection>
            <av:PointCollection x:Key="SearchConnector">395,230 590,230 590,404.5</av:PointCollection>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Flowchart_1" sap:VirtualizedContainerService.HintSize="784,638">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">False</x:Boolean>
            <av:Point x:Key="ShapeLocation">330,12.5</av:Point>
            <av:Size x:Key="ShapeSize">60,75</av:Size>
            <av:PointCollection x:Key="ConnectorLocation">360,87.5 360,186.5</av:PointCollection>
            <x:Double x:Key="Width">770</x:Double>
            <x:Double x:Key="Height">602</x:Double>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="T2.WebSecurity.Business.Workflows.ApplicationController_1" sap:VirtualizedContainerService.HintSize="824,718" />
    </sap2010:ViewStateManager>
  </sap2010:WorkflowViewState.ViewStateManager>
</Activity>